Is there a built in feature (function) within DXL that removes all ending carraige returns within a string (Object Tex). I'm trying to remove all ending carriage returns. I am assuming reg expressions would do the job. |
Re: Carriage Returns I am not sure if this discussion will help http://www.ibm.com/developerworks/forums/thread.jspa?threadID=415194 It discusses a trim function that was used to remove trailing spaces and newlines at the end of text. |
Re: Carriage Returns For whatever its worth, this is what I've determined to be "White Space Characters", which I think are subject to "trimming":
// cl_White: define those characters that qualify as 'white' space.
// Note: In DXL Manual, function isspace() says these are spaces: ' ', \t, \n, \m, \j, \k.
// However: \m, \j, and \k are illegal character constants.
// Proven by DXL (test PrintAsciiCodes.dxl), isspace() thinks these are white:
// ' ', \t, \n, \v, \f, \r.
// Additionally, we want ascii code 160 to be white space, its an
// MS-Word non-breaking space.
// Some other characters print OK, but MS-Word interprets as commands, e.g. page break.
string cl_White = " \t\n\v\f\r" charOf(160) "" // White Space. see above comments.
|